package com.ymttest.database.mapping.withdraw;

import static org.apache.ibatis.jdbc.SqlBuilder.BEGIN;
import static org.apache.ibatis.jdbc.SqlBuilder.INSERT_INTO;
import static org.apache.ibatis.jdbc.SqlBuilder.SET;
import static org.apache.ibatis.jdbc.SqlBuilder.SQL;
import static org.apache.ibatis.jdbc.SqlBuilder.UPDATE;
import static org.apache.ibatis.jdbc.SqlBuilder.VALUES;
import static org.apache.ibatis.jdbc.SqlBuilder.WHERE;

import com.ymttest.database.model.withdraw.Ymt_FundAccountFreeze;

public class Ymt_FundAccountFreezeSqlProvider {

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_FundAccountFreeze
     *
     * @mbggenerated Mon Jun 17 14:33:54 CST 2019
     */
    public String insertSelective(Ymt_FundAccountFreeze record) {
        BEGIN();
        INSERT_INTO("Ymt_FundAccountFreeze");
        
        if (record.getId() != null) {
            VALUES("Id", "#{id,jdbcType=INTEGER}");
        }
        
        if (record.getUserId() != null) {
            VALUES("UserId", "#{userId,jdbcType=INTEGER}");
        }
        
        if (record.getAccountId() != null) {
            VALUES("AccountId", "#{accountId,jdbcType=NVARCHAR}");
        }
        
        if (record.getLoginId() != null) {
            VALUES("LoginId", "#{loginId,jdbcType=NVARCHAR}");
        }
        
        if (record.getFreezeAmount() != null) {
            VALUES("FreezeAmount", "#{freezeAmount,jdbcType=DECIMAL}");
        }
        
        if (record.getFreezeReason() != null) {
            VALUES("FreezeReason", "#{freezeReason,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeMemo() != null) {
            VALUES("FreezeMemo", "#{freezeMemo,jdbcType=NVARCHAR}");
        }
        
        if (record.getFreezeStatus() != null) {
            VALUES("FreezeStatus", "#{freezeStatus,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeTime() != null) {
            VALUES("FreezeTime", "#{freezeTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getFreezeOperatorId() != null) {
            VALUES("FreezeOperatorId", "#{freezeOperatorId,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeOperatorName() != null) {
            VALUES("FreezeOperatorName", "#{freezeOperatorName,jdbcType=NVARCHAR}");
        }
        
        if (record.getUnFreezeTime() != null) {
            VALUES("UnFreezeTime", "#{unFreezeTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getUnFreezeOperatorId() != null) {
            VALUES("UnFreezeOperatorId", "#{unFreezeOperatorId,jdbcType=INTEGER}");
        }
        
        if (record.getUnFreezeOperatorName() != null) {
            VALUES("UnFreezeOperatorName", "#{unFreezeOperatorName,jdbcType=NVARCHAR}");
        }
        
        if (record.getAccountFrozenInvoiceId() != null) {
            VALUES("AccountFrozenInvoiceId", "#{accountFrozenInvoiceId,jdbcType=VARCHAR}");
        }
        
        if (record.getAccountUnFrozenInvoiceId() != null) {
            VALUES("AccountUnFrozenInvoiceId", "#{accountUnFrozenInvoiceId,jdbcType=VARCHAR}");
        }
        
        return SQL();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_FundAccountFreeze
     *
     * @mbggenerated Mon Jun 17 14:33:54 CST 2019
     */
    public String updateByPrimaryKeySelective(Ymt_FundAccountFreeze record) {
        BEGIN();
        UPDATE("Ymt_FundAccountFreeze");
        
        if (record.getUserId() != null) {
            SET("UserId = #{userId,jdbcType=INTEGER}");
        }
        
        if (record.getAccountId() != null) {
            SET("AccountId = #{accountId,jdbcType=NVARCHAR}");
        }
        
        if (record.getLoginId() != null) {
            SET("LoginId = #{loginId,jdbcType=NVARCHAR}");
        }
        
        if (record.getFreezeAmount() != null) {
            SET("FreezeAmount = #{freezeAmount,jdbcType=DECIMAL}");
        }
        
        if (record.getFreezeReason() != null) {
            SET("FreezeReason = #{freezeReason,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeMemo() != null) {
            SET("FreezeMemo = #{freezeMemo,jdbcType=NVARCHAR}");
        }
        
        if (record.getFreezeStatus() != null) {
            SET("FreezeStatus = #{freezeStatus,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeTime() != null) {
            SET("FreezeTime = #{freezeTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getFreezeOperatorId() != null) {
            SET("FreezeOperatorId = #{freezeOperatorId,jdbcType=INTEGER}");
        }
        
        if (record.getFreezeOperatorName() != null) {
            SET("FreezeOperatorName = #{freezeOperatorName,jdbcType=NVARCHAR}");
        }
        
        if (record.getUnFreezeTime() != null) {
            SET("UnFreezeTime = #{unFreezeTime,jdbcType=TIMESTAMP}");
        }
        
        if (record.getUnFreezeOperatorId() != null) {
            SET("UnFreezeOperatorId = #{unFreezeOperatorId,jdbcType=INTEGER}");
        }
        
        if (record.getUnFreezeOperatorName() != null) {
            SET("UnFreezeOperatorName = #{unFreezeOperatorName,jdbcType=NVARCHAR}");
        }
        
        if (record.getAccountFrozenInvoiceId() != null) {
            SET("AccountFrozenInvoiceId = #{accountFrozenInvoiceId,jdbcType=VARCHAR}");
        }
        
        if (record.getAccountUnFrozenInvoiceId() != null) {
            SET("AccountUnFrozenInvoiceId = #{accountUnFrozenInvoiceId,jdbcType=VARCHAR}");
        }
        
        WHERE("Id = #{id,jdbcType=INTEGER}");
        
        return SQL();
    }
}